package com.maserb.monitor.entity.schoolStudent;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.maserb.monitor.entity.BaseIdEntity;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

//家长信息表
@Entity
@Table(name = "school_student_parent")
public class SchoolStudentParentEntity extends BaseIdEntity {
    //账号
    @Excel(name = "用户名",width = 25,orderNum = "1")
    private String userName;
    //密码
    private String password;
    //家长姓名
    @Excel(name = "家长姓名",width = 25,orderNum = "2")
    private String realName;
    //手机号码
    @Excel(name = "手机号码",width = 25,orderNum = "4")
    private String phoneNumber;
    //地址
    @Excel(name = "地址",width = 35,orderNum = "7")
    private String address;
    //头像
    private String image;
    //证件号码
    @Excel(name = "身份证号",width = 25,orderNum = "5")
    private String idcard;
    //性别
    /**
     * 性别 1：男 2：女
     */
    @Excel(name = "性别",replace = { "男_1","女_2"}, orderNum = "3", width = 20)
    private String sex;
    //用户类型（1：教师  2：家长）
    private String type;

    private String isDel;
    private String salt;
    //性别
    private String sexCn;
    private String createUser;
    private String createTime;
    private String updateUser;
    private String updateTime;
    private String lastLoginTime;
    private Date loginTime;

    @Excel(name = "学生学号",width = 25,orderNum = "6")
    private String studentIds;

    //极光推送
    private String registrationId;




    private List<SchoolStudentEntity> studentList;

    @Column(name = "user_name", length = 50)
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Column(name = "password", length = 50)
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "real_name", length = 100)
    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    @Column(name = "phone_number")
    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    @Column(name = "address", length = 100)
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Column(name = "image")
    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @Column(name = "idcard", length = 18)
    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    @Column(name = "sex", length = 2)
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Column(name = "is_del", length = 2)
    public String getIsDel() {
        return isDel;
    }

    public void setIsDel(String isDel) {
        this.isDel = isDel;
    }

    @Column(name = "salt", length = 50)
    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    @Transient
    public String getSexCn() {
        return sexCn;
    }

    public void setSexCn(String sexCn) {
        this.sexCn = sexCn;
    }

    @Transient
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Transient
    public String getStudentIds() {
        return studentIds;
    }

    public void setStudentIds(String studentIds) {
        this.studentIds = studentIds;
    }

    @Column(name = "create_user", length = 50)
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Column(name = "create_time", length = 20)
    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Column(name = "update_user", length = 50)
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Column(name = "update_time", length = 20)
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Column(name = "last_login_time", length = 20)
    public String getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(String lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    @Column(name = "registration_id", length = 50)
    public String getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(String registrationId) {
        this.registrationId = registrationId;
    }

    @Column(name = "login_time")
    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    @Transient
    public List<SchoolStudentEntity>getStudentList(){return studentList;}

    public void setStudentList(List<SchoolStudentEntity>studentList){this.studentList = studentList;}
}
